package com.qianfeng.smsplatform.monitor.fegin;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;


import java.util.Set;

@FeignClient(value = "CACHE-SERVICE", fallback = CacheServiceHystrix.class)
public interface CacheService {
    @RequestMapping(value = "/cache/getObject/{key}", method = RequestMethod.GET)
    Object getObject(@PathVariable("key") String key);

    @RequestMapping(value = "/cache/keys/{pattern}", method = RequestMethod.GET)
    Set<String> keys(@PathVariable("pattern") String pattern);
}